package com.call.project.web.controller;

import com.call.project.entity.Register;
import com.call.project.jni.CInterface;
import com.call.project.utils.ResponseEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 Created by IntelliJ IDEA.
 User: wk
 Date: 2017-03-28 下午6:24
 */
@RestController
@RequestMapping("/register/")
public class RegisterController {
    @Autowired
    private CInterface cInterface;

    @GetMapping("info")
    public ResponseEntity getInfo() {
        return ResponseEntity.success(new Register(cInterface.isExpire(), cInterface.isRegister()));
    }
}
